# 创建时间：2025/5/10 星期六 15:01
# 创建人：李德才

"""  需要将当前文件夹设置为python的工作目录，否则会报错 """

from MySQL_Util import MySQLHelper

Db = MySQLHelper()
fetchall = Db.findAll("select * from as_user ")
for item in fetchall:
    print("循环结果：", item)

print("查询一条：", Db.findFirst("select * from as_user "))

print("查询2条：", Db.findMany("select * from as_user ", None, 2))

print("修改数据：", Db.update("update as_user set username = %s where id = %s", ("dada", 9)))
print("删除数据：", Db.delete("delete from as_user where id = 8"))
